Bug fix to prevent forwarding a packet that has reached its destination.