gutter patch cherry-picked for 13.06 bugfix