the reverts should be done in reverse order (in case someone assigns the same var twice in the same `withScopedVars`)