What about `... && !excludedNames.contains("gml:${elementName}")` with prefixes removed from `excludedNames`?  Less repetition...