Don't reverse scope_chain array on join constraints.

Don't reverse scope_chain array on join constraints, just use negative index to access elements.