Factor out checking `update` variable and setting only if not already set