[DBAL-492] Fix bug in foreign key comparision when inside a subschema.
Merge branch 'DBAL-492' into 2.3