silverstripe/silverstripe-framework — pull request #2150 by hafriedlander (2013-06-25 05:37:40+00:00)
Title: FIX Arguments to method calls reseting scope

Better fix than https://github.com/silverstripe/silverstripe-framework/pull/2028 or https://github.com/silverstripe/silverstripe-framework/pull/2149

Adds a new method to scope, `locally`, which resets the scope to the current local base, but remembers the current deviation from local base. When XML_val or equivalent lookup chain end-mark resets the scope via `resetLocalScope`, if there was a pre-existing deviation from local base we restore to that rather than local.