check if in NameSpace

Not a problem, just a little hint: For small arrays like this (with usually 2 or 3 elements) a single in_array call can be faster than a flip + key lookup.