- # and clear it precisely when a found command is
- # received for the rightmost fixed-in version, which
- # equates to the most recent fixing of the bug, or when
- # a versionless found command is received.
- if (defined $version) {
- my $lastfixed = $data->{fixed_versions}[-1];
- # TODO: what if $data->{package} is a source package?
+ # and clear it when a bug is found in a version greater
+ # than any version in which the bug is fixed or when
+ # a bug is found and there is no fixed version
+ if (defined $version) {