semantic: Ensure nested functions don't use variables before declaration.