fix to PDI-9790 improper merge/rebase

Remove duplicated code first introduced in PDI-5229, then - duplicated merge with PDI-9790.
Also this code will cause 
org.pentaho.di.trans.TransTest.testTransFinishListenersConcurrentModification
junit test failure