Revert "do not cancel pattern matching if matched enum is empty (closes #2233)"

This reverts commit cf0b823d017058ac56c0bf96a3bb410badffe388.