Fixed a really annoying problem with binding to local variables.