Improve the field check in the page/file picker (see #6125)