Don't try to manipulate the panels before they've been parented.

Was causing cinnamon to crash when panel-edit mode was on during a
cinnamon restart

Fixes #2294