Test cases fails when we run "location.parentLocation is null"
as at that time location.parentLocation do not exists and in memory
version it fails althought it works fine in server mode.

So added extra clauses (NOT HAS(location.parentLocation)) or
location.parentLocation is null