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.