Reliable parentheses around condition detection

This fixes #270.