Make sure the exceptions are checked in growing order of generality.
First check for the most specific exceptions then for the more
generic ones.