Patch 1

merging rob wu's patch to fix infinite recursion when caching symmetric associations