Updated ForeignKeys test to cover foreign keys within one table, and to test for cases where the master column name is not the same as the detail column name.