back-fit from 1.4.5

testing e6282d75a6321f8584e95bcb21d15aa3a2a3c413 on 1.4.5 uncovered some
additional fixes that were in that branch already. These are back-fit to
1.4.4