mon: backports for #9987 against giant

Passed make check.