bugfix introduced in one of the recent upstream commits