Check earlier to avoid sanitzer warnings
Fixes oss-fuzz issue 47689: "load of value 65, which is not a valid value for type 'ICNSEntry::Depth'"
Pick-to: 6.4 6.3 6.2 5.15 Change-Id: Ia1b119d863e9518e308117ed1dd6a297297bc537 Reviewed-by: Eirik Aavitsland eirik.aavitsland@qt.io (cherry picked from commit ea4684c6)