LPS-39799

I've asked a question about this here https://in.liferay.com/web/global.engineering/forums/-/message_boards/message/1854632. We may be able to trim the fix down to minimal change depending on our answer to that question.