Fixed backwards ordering of ordinals. variableMap and MatchHelper now handle a variables that appear more than once properly.