Fix for type encoding with several types on a rule.