Co-authored-by: Trond B. Krokli <[email protected]> (cherry picked from commit e6d9d9ead99aba4bfbd0b6389cb7a88827fe40d7)