LPS-41592 make staging more robust (avoid nullpointers after undeploying portlets)