Sanitize global overrides in unit tests

Avoid reinventing the wheel by doing manual backups.

Change-Id: I41c3e8160169d2f7817dec0d1b36b3db2eaa8f3c
Merge "Sanitize global overrides in unit tests"