Fixing a bug while calling clearXHRMocks for the first time