fixes #8592 - allow plug-ins to modify multiple hosts actions

Refactoring patern: Extract method.