Fix bug 4635

Also applicable to 4.3