Backport of upstream fix