PHOENIX-1182 UPSERT SELECT not working with joins; Add a test in DerivedTableIT