Fixing issues with infinite loops when calling association_id on a remote association