The error is thrown in version 10 but I get the wrong results in versions 9.3 to 9.6, both in the almost latest (9.3.21, 9.4.16, 9.5.11 and 9.6.7) and today's releases (9.3.22, ..., 9.6.8)
As Pavel said we fixed this in 10 but did not back-patch the behavior change.