Fix bug 3152 (fix by J. Holt)