fix Issue 12460 - Crash with goto and static if

By implementing issue 10199, LabelStatement::statement may be NULL. So LabelStatement::syntaxCopy should consider the case.
Merge pull request #3434 from 9rnsr/fix12460

Issue 12460 - Crash with goto and static if