Revert "Omit some needless conditions", to fix access violations

This reverts commit 2cb46ca69a68a9eb837e0696080e27708286915c.