Check wether `$objPage` is a model in `PageTree::generate()` (see #5702)