Fixed a bug inside the smartpointers which caused the compiler-provided copy
constructor to be called instead of the one which does the reference counting.