RM5849: Fix for upstream c736569c737e96a69b75a6bc8e43ca9d5db5b2a3