It appears that Kramdown only supports fenced code blocks at the root (not nested) of the document. While other implementations have recently been adapted to support nested fenced code blocks, Kramdown still implements the old original proposal and has not been updated in some time. If you would like to use fenced code blocks nested within list items, then you will need to use a different Markdown implementation (and/or convince the developers to Kramdown to update their implementation).
You may need to update to a more recent version of Kramdown, and/or adjust the amount of indent that you have in front of each line of your fenced code block. There seems to be some inconsistency in that regard. According to this comment, you should have exactly four spaces of indent, however, at least some versions have been know to fail with four spaces but work with two.
Irrespective of which Markdown implementation you are using Jekyll provides a template based method of identifying code blocks for highlighting purposes. However, that is also restricted to only being on the document root. After all, if you wanted to use a code block within a Markdown document to show how to use this method, that code block would be indented. Therefore, Jekyll only acts on non-indented blocks.
You may find that a JavaScript highlighting engine will serve you better. That way you can use standard (indented) code blocks which will work with any Markdown implementation and nest them however you like. And some of the better JavaScript highlighting engines have pretty good language detection, so you usually don't need to label the language of the code blocks.