Thanks Michael Bitzi for the reporti and Tim Graham for the review. Backport of b26fedac from master.