Made Model.__eq__ consider proxy models equivalent

Fixed #11892, #16458, #14492.