Fix apSubstTypeMapKeys

  apSubstTypeMapKeys wasn't pushing the substitution down when the key contained
multiple variables.