I am not sure thats fair, many EU ministers had indicated that Turkey should be considered for membership and negotiations were ongoing since 2005, so it was on the table.
It could be argued that the Leave campaign who were probably smeared as racist insisting this was a bad move by the EU having foreseen likely incompatible geographic, political and cultural differences showed greater awareness of the situation.
My mistake, I could have sworn that's what was said during the referendum campaign, my memory is getting terrible.