fix issue 10694 - wrong purity check for static variables with impure destructor

http://d.puremagic.com/issues/show_bug.cgi?id=10694