fix #6431 (more reverse-i-search problems)