Validate bemhtml before compiling

This allows errors to be reported at original
locations.