Solution for redefinition of functions being used in other functions?

Check this FAQ entry and overall thread.