Any reason not to just move the setting of this value inside the conditional as well?