Fix #1650 Importing categorical attributes broken