Make error messages consistent. Add YAML tests for RESTRICT cases.