Fixes escaping of consecutive 0x00, 0x00, 0x0{0-3} sequences. (cherry picked from commit f574012d5f)
f574012d5f