query improvement for :collapsed_pages