fix match_production for the empty-sequence case