FPCGStack::ReplaceRoot

Utility function to replace the root object, in case of re-instantiation.