Adds check for statement references.