Fix for #8886. Correct state=absent for statements without name/alias.

Please test it and give feedback.