Fix Issue #24 Denormalized ForeignKey bug or incorrect declaration?

Fixes Issue #24 Denormalized ForeignKey bug or incorrect declaration?

Test added and passes in sqlite.