Infinite looping

This was really important: a self closed no content element could potentially make the lib run indefinitely.