an24: re-fix #2223: reinstate changes from r4809 and r4810, that were mistakenly undone in r4996.
Authored by: lbrenta 2020-07-09
Parent: [r5031]
Child: [r5033]