It turns out association of tbl spans with layout rows is simpler thani thought. Fixing a bug in curs_addch(3) and minus 25 lines of code.