After reading the purpose of the corex module, I think the idea can be changed to add a new function in the corex module which would do the same as the set_advertised_address, but accepting variables as parameters. Then there is no need to modify the old function.