The only way I can simulate this is by not enclosing my stored procedure with
PROCEDURE <procname>
...
ENDPROC
Assuming this is not the case, I would suspect that your project file is corrupt and a clean rebuild is due. To do this, create a new project, add the first (main) file, then rebuild.