compiler/state_var.m:
As above. This fixes Mantis bug #487.
Also, when !.S occurs in a goal when the state var S has not yet
been defined, do not let this !.S occurrence define it, since
definition is normally done by !:S occurrences. This lets a later
!:S occurrence, with the pair possibly expanded from !S, define it.
tests/invalid/bug487.{m,err_exp}:
The Mantis #487 test case.
tests/invalid/Mmakefile:
Enable the new test case.