            if !simplified_bindings.contains_key(&var) {
                if let Some(value) = bindings.get(&var) {
                    let (simplified, mut symbols) = simplify_var(&bindings, &var, value);
                    simplified_bindings.insert(var.clone(), simplified);
                    referenced_vars.extend(symbols.drain());
                }