Improved error messages in case of version incompatibilities. (#2657)