Workaround/fix for cases where localsettings not run in global scope

This is the case in some extensions when running PhpUnit tests via executing "phpunit" from
within the extensions directory.

Change-Id: Iccebf62d607102eabcbe32272827e2977f012d90