I can't say what is wrong. That program does allow multiple results, and works for me.
One things to look at: you must match the entire genre, not part of it. For example, Military.History will not be matched by Military. You must add all of the subgenres. Yes, this is a pain. I am considering adding a list_re function that will return a sublist of items in a list that match the pattern. I need to think about how this might be used.
If the above does not point you in the right direction, please post the contents of 'tags' and '#shelf' for a book that doesn't produce the correct values.