Fixed #23956 -- Fixed migration creation for multiple table inheritance

Ticket: https://code.djangoproject.com/ticket/23956