LPS-49341 Allow doAsGroupId to work for non-control panel portlets
LPS-49341 Only fetch if the groupId > 0