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

...duce build time and flakiness.
isn't it better to just initialize this inline and drop the if?