A couple of fixes to the language profile selector
Now it should work with all project paths.
(cherry picked from commit c679d3f421da02deb45b6baf16bc2ae6ae36af50)