LPS-40750 return null, otherwise ClassCastException will be thrown
LPS-32323 Add the live group instead of scope group in case the portlet are staged
LPS-32323 Source format and refactor - only apply group id swap in certain cases - avoid breaking remote staging as well
LPS-32323 This is faster