Replaced the Pair hash check for vertex/pixel combinations with a struct that contains up to 6 combinations of shaders (thanks Lasse for the help). Shaders which don't contribute to the combination are just null.