Fixed InternalError exception for incorrectly nested tables and added some debug functionality

* sweble-wikitext 9f4e269...7252560 (2):

    commit 7252560adb657bedbfcbbad4e271ad83c1370284

        Fixed bug in unit test

    commit 707cb7a7ed3ab4dc1d417ec247998aa6100ed5d0

        Fixed InternalError exception for incorrectly nested tables and added some debug functionality