[PLAT-3581] Always invalidate a compilation if the functions cease to be valid.
[PLAT-3580] Restructure code to make debugging easier.