fix issue 10694 - wrong purity check for static variables with impure
destructor
Merge pull request #2373 from hpohl/10694

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