Merge "Adding null check for focused stack before trying to switch affiliated tasks."