sub apply_to {
my ($self, $old_hyp) = @_;
- return ($self->_apply_to_hyp($old_hyp), $self->alternative_step);
+ trace 'step.apply.old_hyp '.$self => $old_hyp;
+ my $new_hyp = $self->_apply_to_hyp($old_hyp);
+ return (undef, $self->alternative_step) unless $new_hyp;
+ trace 'step.apply.new_hyp '.$self => $new_hyp;
+ return ($new_hyp, $self->alternative_step);
}
sub _apply_to_hyp {