Fix behaviour that operates on a non-empty TreeMap for AnnotateCommands