Fix miscompilation when module contains multiple named funs

A module containing two named funs bearing the same name and arity could be miscompiled.

@sfwc