block: fix backport from 3.4