Fix crash

It makes no sense to access “it->first” if “it == table_map.end()”, a
thinko introduced in 9f5b6e2e6a5c0182e4c89233aff8a4f6414d55e0.