Add syntax checking for "definitions"

It was missing. No backport to 1.4 planned: a validation error would be
raised all the same, it is just that it will be detected later.

Signed-off-by: Francis Galiegue <fgaliegue@gmail.com>