Correct the function -> group lookup

We got rid of the reverse lookup in project.json, but we have this
information in the function definitions already, so use it.