Don't select the same columns multiple times with diamond inheritance

Change-Id: I228c102e72942c8b98de9a11b838a322c65be182