use ordered for sorting Add and Mul args

Fix sort_key for Dummy to use .dummy_index