Iterates all entries in a map and cuts off the key value before a pipe (|) symbol, i.e.
several tasks might use the same discriminator. The task-specific and the actual key are
separated by a pipe. The task-name leads to many redundant entries that clutter the output
file, e.g. the feature mode occurs for each task that imports this variable. This method
cleans up the keys and removes this redundancy.
discriminatorsMap - the map for which the keys are shortened