orm: Fix magic lookup of one-to-one relations