LPS-43161 When (pos == -1) the value of layoutURL should be the redirect, because in some cases the redirect is directly the layoutURL