Handling duplicate function references.  Trying to simplify things.