pf: reset index if it's outside the table
when table content changes we need to reset index
to the initial value and do not use the counter;
reported by Sebastian Benoit and Daniel Krambrock,
tested by Sebastian Benoit, ok henning zinke
Obtained from: OpenBSD, mikeb <mikeb@openbsd.org>, dba347c9d1
Sponsored by: Rubicon Communications, LLC ("Netgate")