Fixed content loss bug in reversion and restoration of layouts