This appears to be a regression triggered by support for Flate predictors, a performance enhancement introduced in Mako 6.6.0. It can occur in the context of rendering a page, or part thereof. A result of the issue can be seen here – it causes noise in the first few scanlines of an image:

While the problem can be avoided in Mako 6.6.0 by setting the environment variable JM_USE_INTERPRETER_FOR_FLATE=true
, we recommend deploying Mako 6.6.1.