Reject spurious \end{code} in literate mode (#8430)