scan: tweak the matching of types

Join the prefix + type name to make the code easier to read.