Fix early close of tags causing escapism

Previously, it was possible to open a tag outside of a table, then close
it inside in order to trick the cleaner into thinking the tag had been
closed. This is now fixed.