repair some legacy logic agound grain overrides, fix #3882