Fix bug where an empty preference set would lead to an IllegalStateException