Fix the tab completion tests (#20867)