This fixes a regression introduced by a5f6cbce. Thanks Gavin Wahl for the report and Tim Graham for the review. Backport of cd3c042b from master.