Fix vector out of bounds in script tests
Merge pull request #5003

68af7d0 Fix vector out of bounds in script tests (Pieter Wuille)