minimize hashset usage in MappingContext