Add source/metric groups items re-ordering support
Fix order loss issue when updating groups entries
Prevent pattern testing on groups `single` entries
Make JS constants numbering consistent