fixed an issue with postgre being a dirty dirty santa claus with sets mapping one table to itself