The centralizer of invariant functions and division properties of the moment map