Accept table reference from either side of join.

Fixes #1