Implement modificationTracker for CompositeDiagnostics

 #KT-5981 Fixed