[TECHNICAL SUPPORT] LPS-38482

Hi Máté,

This issue is the same as https://github.com/matethurzo/liferay-portal/pull/431 but I modified the source based on our discussion.

If you have any concerns, please let me know. I've tested this issue and it seems the fix works fine.

Regards,
Vilmos