Fix another ambiguity and make diagnosticlistener configurable.