Fixed a regression introduced by 28efafa24c. Thanks Michal Čihař for the report and initial patch, and Collin Anderson and Tim Graham for the reviews. Backport of 8b4cc9df9c from master.
28efafa24c
8b4cc9df9c