Inherit more params in joins. Closes #520
Better semantics for empty select.
Closes #498