Another rewrite of loadRelationships.