CB-7601 Build fails due to capabilities with m: prefixes are incorrectly sorted

https://issues.apache.org/jira/browse/CB-7601