Issue #118 resolved
Maybe a bug inside Function.copy_container
I noticed that Function.copy_container is returning new Function object:
def copy_container(self): clauses = [for clause in self.clauses](clause.copy_container()) return Function(self.name, type=self.type, *clauses)
but I don't see it passing the new packagenames attribute. It may or it may not be a bug. I simply don't know. But maybe you do...