[BUGFIX] SQL error in install tool if no root page available

Resolves: #52008
Releases: 6.2
Change-Id: I8fd7546ca6a293c6e9d11dd46d37a8cc89cf9620
Reviewed-on: https://review.typo3.org/23833
Reviewed-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring