Don't print out too many closing divs

Make sure not to update the $prev_depth variable past MAX_NESTED_DEPTH
(because the div should be closed immediately).
Merge pull request #741 from afuna/fix-nested-closing-div-comments

Don't print out too many closing divs