Commit 64f5edca24 fixed the same hazard on master; this is a backport, but the modulo operator does not exist in older releases. Michael Paquier
64f5edca24