Take into account validity of profiles when averaging.