MULE-7841: Avoid to retrieve the local host several times in order to re...

...duce build time and flakiness.