If a table inherits foreign keys which reference a non primary key column then the generated foreign incorrectly references the primary key column.
This is because the referenced columns from the included table are not passed to the call to create the foreign key in the DenormailzedTable class.