Revert "Fixes bug described in #3581"

This reverts commit e6c6e0bf2c541885f890968d6047974d587a422e.