fix autodetect inverse for self associations