Added deepcopying of prototypes in spawner. Resolves #565.