Initialize "previous value" variables in the static initializer function, instead of the 'initial' blocks function. Fixes #5499