[TASK] Small clean up in the page tree code

There are minor issues in the page tree code, which should be
cleaned up. This is a non-functionality change.

Change-Id: Ia4a27797293cb94d58927036ec33dd28a02d0961
Resolves: #46435
Releases: 6.0, 6.1
Reviewed-on: https://review.typo3.org/19049
Reviewed-by: Mattias Nilsson
Tested-by: Mattias Nilsson
Reviewed-by: Wouter Wolters
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack