Start
Find \MGL@@@<script>
Is it defined?
Compare script vs. code
Rewrite/recompile script
Undefine \MGL@@@<script>
Define \MGL@@@<script>
End
Are they equal?
Yes
Yes
No
No