Detect when model {} has been called with an untransformed closure and error with an appropriate message.

This means it was called in some kind of nested scope, or from outside of a build script.

+review REVIEW-5177