Fixed #22918 -- migrations.operations.SeparateDatabaseAndState crashes (and has no tests)