pub fn is_structurally_valid_expr(expr: &Expr) -> bool
Perform a basic structural validity check on an expression.
This checks that bound variable indices are in range, but does not perform full type checking.