Fix of protection against adding states and actions with the same name.