LPS-33560 LPS-41897 Minimal Fix for FP

Hey Brian,

I'm resending this from https://github.com/brianchandotcom/liferay-portal/pull/15052. 

This is the minimal fix intended for the Fix Pack (I wasn't sure if I should send it to @zsoltbalogh or you.

The complete fix is https://github.com/brianchandotcom/liferay-portal/pull/15153