Bug 852541 - Fixed to handle GAIA_DOMAIN set to something other than default