Fix bug 3461.

Please review.