Supports recursive copying.