Fix for issue #177

Instead of updating each relationship one-at-a-time, create a
dictionary of them and update them all at once so that
newValueForRelationship doesn't fail after the first relationship.