fix Issue 8898 - false positive dangling else warning

http://d.puremagic.com/issues/show_bug.cgi?id=8898

Apply the same way as #1129 to `static if`.