Update Container.cpp

Fix for addControl().

Rearranged execution.
Adds ref before removing control from current parent, avoiding deletion of control.