`indexOf` requires `.main` to be an array - although this obscures the error so might want to add a warning...