Bugfix: object copy was making empty arrays into empty objects.