Fix handling of multiple init functions

We handled multiple init functions in the same file ok, but if two files
in the same package had an init function then we would generate a name
clash between those files.