contains.h: allow look-up by compatible types