Fix issue in swapping ids of sequences and tables on dbm file