Fixed #23556 -- Raise a more meaningful error message when migrations refer to an unavailable node

https://code.djangoproject.com/ticket/23556
It seems like this error message would be even more useful, and would address the confusion that made us originally think this was a bug, if it went on "wasn't able to because some of the replaced migrations are already applied."