pcbnew: Fixes crash when a module is changed after modification in the module editor.