Hardening/harness errors under valgrind (into develop)

"Twin" PR of #492