Fixes #3583 (cherry picked from commit beb1214926, adapted: drops the release branch's tidy -compat=1.27 hook)
beb1214926