YARN-2250. Fix finding lowest common ancestor of target and source queue during app move