Fixed #22568: Better proxy model support in migrations