Fixes to VariableNode resolving