deepcopy() to separate scopes (fixes #9)