BZ 786082 - tomcat as a service is not properly detected.

It fixes BZ 786082 and 756456.