Revert "Backport bug fix from carp"

This reverts commit 316c47327b2fc7cebfac67bb558bb75390169bed.