Updates #870. Originally committed to SVN as r3358.
Updates #870. Originally committed to SVN as r3357.