This definitely does the right thing on the live notebook, so nbconvert must not be generating the same HTML.