Improve error messages for partial functions in Data.Data

This closes: #5412