Consider guards for out-of-bound checking

* tools/dvecompile.cpp, tools/dvecompile.h: here.
2 jobs for er/bounds in 7 minutes and 51 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #84319
build-stable

00:07:51

passed #84320
build-unstable

00:03:43