#111345 function not available during profile install. patch by singularo. requires backport to 5.x branches