Fix for #830 - added index so that possible values for a particular filter can be looked up more quickly.