Fix inverse of check related to nested fields

This fixes the bug I introduced in #1962.

That pull request did not make the necessary change for the view partial for has_one/belongs_to associations with inverse_of and as a result, there's currently an error with those associations.