I was following that, but the cause may be a different script is why I suggested trying to make the variable visible if it's not already, then trying the same test steps with this script inactive to see if the same behaviour is observed.