XWIKI-9822: Failure to migrate to 5.3 database older than 4.0 when it contains wiki descriptors

(cherry-picked from commit ac7e2f39cd38eaf60a574b66af09c6135717b1d6 on master)