Issue #368: Fix Markdown in raw HTML stops working

Originally there was an infinite loop issue that was patched in issue
#308.  Unfortunately, it was fixed all the way.  This fix patches the
infinite loop fix to only add an offset to the `right_listindex` when
it is in a infinite loop scenario.