Merge "Avoid use-after-free race condition when rebasing theme" into mnc-dev