LPS-41900 Include commits that were reverted by error

Hey Brian

The following commits were necessary for this fix https://github.com/brianchandotcom/liferay-portal/pull/15153 but were reverted by error. 

These commits are necessary to pass the tests and fix the issue.

Thx!