Do not report SA1025 in some contexts

Fixes #259