LPS-30665

This commit was reverted on Oct 30 but really is needed. Same issue as WSRP occurs when there are existing gadgets and the OpenSocial portlet is redeployed.