Fix reflexive relation lookups not working correctly.