Make expensive string manipulation depend on settings

No need to compute value of *qualification* if it is not used later.