Fix multiple state type registration

If there are multiple states always append a state unique
id of the form "+L%u". This has no affect on the first state, thus
avoiding type name changes and a state is still prevented from
registering the same type name multiple times.
Merge pull request #91 from gregier/multi-state-derive

Fix multiple state type registration