Fix crash when pos == -1

1 job for release/20.08 in 17 minutes and 58 seconds
Status Job ID Name Coverage
  Build
passed #58846
build_clazy_clang_tidy

00:17:58