In this day in age of branded fares that book within the same booking class as restricted fares its increasingly difficult to decipher exactly what booking class has been booked. The assumption a flex fare will automatically entitle you to earning Avios or tier points isn't necessarily going to end well. The only way to avoid this is by requesting specific fare/booking classes and then taking a flex fare option once the preferred booking class has been secured. Not particularly easy to accomplish when airline websites are scripted in such a way to only show the lowest booking class available.
This would d either require a call up reservation or the assistance of a half decent travel agent in order to accomplish.