locals.parser: check for valid locals names.