Backported reversal of af9895d (close #162, ref #132).