runtime/bindings: Fix use-before-assign bugs.