And what do you expect? Is there easier solution apart from inserting conditions into internal indexer's code? Thats how Bribe intended his filter to work anyway.
Instead of unitid check smap he could just add a hidden ability to each of those unit-types and then check: (Level of "ability" for (Matching unit) == 0). He could also retrieve the constant integer values corresponding to given types, order the types to be on thop of each other - A000, A001, A002 (...) and then perform integer value check: GetUnitTypeId(u) > range and GetUnitTypeId(u) < range.