Prevent duplicate column names being input to SELECT