Fixes a failed test - type wasn't being checked for null value
Consolidates useSameColumnNames logic into SqlIndex
Handles @Record.FieldInternalNamePrefix properly for @SqlDatabase.FieldIndexTable(source=true) fields