MULE-7841: Avoid to retrieve the local host several times in order to reduce build time and flakiness.