Improve error message when importing data constructors (ticket #4058).