Ported to HC 4.3; references #19