fixes issue #204

fixes issue #204 
The scope of `filteredTypeNames` seems to be too large. It can be declared inside of the `if` below. We gain one line of code (ok, not much) and we ensure that it is visible only where it actually needs to be.