Fixed another latent issue with unique_ptr and auto_ptr

The clang compiler for mac seems to be a bit more sensitve to unique_ptr and
auto_ptr semantics.