Remove unneeded brackets from generated join statements