small optimisation
Merge pull request #1060 from andreichuk/AppDomainScanner-fix

small optimisation