BZ-991058: protecting code execution on custom accumulates. Adding test cases.