Added test case to test flexibility.
Updated old test case 443678, which is better with this fix.
This fixes#523 and tries to be as general as possible. Right now the fix is
only applied if the prev or next tag is a body level div, but perhaps should
be applied for anything that's acting as block level element. In any case,
the specific bug is killed.