Avoid unwrapping wrapped references in transform_iterator's
implementation.

Fixes #379
Merge pull request #402 from jaredhoberock/issue-379

Avoid unwrapping wrapped references in transform_iterator's