The Bug
1) Make a save file.2) Place legendary quality entities
3) Save and Close game
4) Change that entity's prototype type to a new type.
Example (execute in data-final-fixes.lua):
local recycler = data.raw.furnace["recycler"]
recycler.type = "assembling-machine"
data:extend({recycler})
data.raw["furnace"]["recycler"] = nil
5) Open game. Open save file
6) All those entities are still there, but in normal quality.