Problem here is that the flavour name is user supplied and so somewhat arbitrary. Suggestion would be to use the flavour ID in a similar fashion to how the images are done.