1. That situation is equivalent to the one where the text is different and longer, and generally web pages are designed to layout properly regardless of the content of multiline text sections, so probably not an issue in practice
2. One could just determine the height of the float ceiling with the greedy algorithm and run the optimization algorithm with that constraint