fix inverse_of when find_or_initialize_by_*

inverse_of relation was not being set when calling find_or_initialize_by_ and the entry was
found on the db.
Merge pull request #12375 from arthurnn/inverse_after_find_or_initialize

Inverse after find or initialize