check queryString first, then skip !isLocalScope for #3004