Write passes duplicates to Rewrite.

Resolves issue #65.