[Only for master, not for ee-6.2.x] LPS-50629 adapt from ee-6.2.x

cc/ @adolfopa