Add the internal "level_changed" variable; this is set in the level editor if changes are made which would potentially invalidate the solution, requiring the level version number to be incremented.
(Some changes do not set this, such as changing the level title, or its order number. In this case, the level version number remains unchanged when the level is saved.)