backport of #508 to 3.2populus