Actually the code is 100% correct.
Although you did a translate in the 'cm' operator, you then proceeded to "invalidate it" but doing a '0 0 m'. The 'm' operator is explicit, NOT relative. This is clear in ISO 32000-1:2008, 8.5.2.1, Table 59. (boldface is mine)
Begin a new subpath by moving the current point to coordinates (x, y), omitting any connecting line segment.