This fixes the apparent scope and comparison issues when calling a foreign key relation

See bug: https://github.com/1602/jugglingdb/issues/202

Unit tests seem to pass still.