tests: add check for recently found flags bound-checking bug