Fixed #23489 -- Added numpy 1.9+ support in template lookups