rewrite expand_or in matcher.ml (closes #2610, reopens #2508)