#5602: Update hook to revert variables.