The workaround which is to add 8 spaces instead of simply 4 is actually written in the markdown editing helpmarkdown editing help:
(...)
(...)
(...)
Preformatted text in a list item:
Skip a line and indent eight spaces. That's four spaces for the list and four to trigger the code block.