backporting a79053 to hydro-devel to fix #389