Merge "Attempt to fix NPE when reparent to the original task." into sc-dev