The current behavior was introduced in 65702719, which was a wrong fix for an issue that was actually fixed in 12e04e4e. This commit effectively reverts 65702719 and 1782b841.
65702719
12e04e4e
1782b841