Fix subtle bug in CopySample introduced by combining Object/Material.

Refs #9842