Self joins.
Added test for expanding attributes during self-joins.