Fix #130 in mainline (for 2.2)