allow the name of new items / new groups to be customised, and append a number if the name is already taken. This change resurrects the def() method (partial revert of 04e099f / dbbad26)