Change from pass-by-value to pass-by-const-ref

The object is copied when put into the list, so there should be no
danger of dangling references.