Fix broken tformat dispatching

Also fix indentation of exit of DUMP_NEXT_SCOPE()