Text flow should not be a problem. Deleting linked frames just pushes the text into the following frames, so you can delete the pages, add new pages to replace them, then add new text frames on the new pages and thread them in where they belong. Probably easiest way to do that is first thread any consecutive new frames together, then click the outport on the last frame before a new empty and click inside the empty frame.
I don't have a clue what causes this, so I have no way to give an informed opinion on the cause. I've seen it now at least half a dozen times, which leads me to think its a bug, and it wouldn't surprise me if the bug were in either the page tool, or more likely something to do with liquid layout/alternate layout, which is a little newer.