I have just updated core to 3.6.4, and have discovered that a global script must be saved before validation "sees" the current state of the script.
If I remember correctly, I used to be able to edit a script and have validation operate on the current state of the script without having to first save the script.
This old behavior seems to be preferable, both for convenience and to be able to edit a script and test it without affecting the script being used by the system until a change can be made and tested.