Fix #1836 in a slightly more general way.
Issue #1836: These changed slightly.