Better schema error

I wanted to separate this out from my previous PR, hence the branch.  If you like it, I'll merge to master and create a new PR.

This fixes a problem in the schema builder with really large records.  It's difficult to tell where the problem is coming from.  This gives a nice exception message.