I wonder how much of this is cultural. I grew up on the continent, in a country where maths and logic are revered as the highest academic topics, and I never faced any obvious barriers in studying maths.
During highschool, in my year, the top students in maths were always female (me and another girl).
At university (studying maths & physics) there were more men (only 30% female?), but the top students were still female.
In MEng computing... same thing, the top two students were female (even though the overall student ratio was now only 10% female)
In my career (including in the UK), people often comment that female experts are rare, but typically exceptionally talented (and the reasons there's less female experts at the very top are institutional: e.g. impact of maternity break on an academic CV, re: number of publications)
So it seems to me the bias mentioned in this article is more among non-experts (school teachers...), and I think there is a strong cultural element to this "layman bias", as I didn't experience it at all in my home country (in fact I was pushed towards maths, at the expense of other topics where I was equally gifted).
I think people from far east countries experience something similar (lots of girls in maths/computing...). This is particularly noticeable when these people emigrate, e.g. to the USA, and the "Asian = good at maths" stereotype seems to trump the "girl = bad at maths" stereotype.