Revert last commit

The bug fix was actually a bug. The check was correct before, and
the fix only made things worse. So it's being reverted.