Do not use `UNION SELECT` when searching for parent pages (see #6704)