Update: Add missing environments and fix sorting/grouping of rules (fixes #1307, fixes #1308)