BZ-1146836: fixed errors ordering columns:
- IndexOutOfBoundsException after ordering columns several times
- Error loading column order after table preferences are stored