The ANS Forth locals wordset does not define a syntax for locals, but words that make it possible to define various syntaxes. The order of the locals corresponds to the order in a stack comment. Locals can be defined only outside control structures.
Locals can interfere with explicit usage of the return stack.
If you don't use return stack accessing words in a definition using locals, you will be all right. The purpose of this rule is to make locals implementation on the return stack easier. The whole definition must be in one line. I.e., they are initialized from the stack. Using their name produces their value.