Explicit single-flag checks.
Merge pull request #316 from evan-king/master

Uses explicit single-flag checks in StreamWrapper::triggerError