Merge "Fix some bugs around stack parenting"