Have you considered giving each table a "name", so as to be able to identify it correctly?