Fix a problem with documents starting with block level elements