Brad Bowman
Mega Patron

Try temporarily inactivating this script to see if the behavior is the same.  It sounds like you have another Catalog Client Script or UI Policy affecting this variable.  Since it's after after an update, it could also be a Client Script, UI Policy, or Business Rule on the sc_task table.  In the script, you don't need variables. in g_form methods.  It's probably not hurting anything as long as it is otherwise working, but it is unnecessary.