Cherry picked from master: https://git.openembedded.org/openembedded-core/commit/?id=8d06116caf2382ad4782b9b2da50534d076a736d