Fix a bug which gave the wrong filename key to the last sequence in the previous file

In the case of multiple files, the last record of a file is pushed after
reading the first line of the next file.  This is important for the
global filename-key option since the key is added at record output.

The solution in this commit is a bit ugly, but it works, is clear, and
doesn't involve any cleverness with globals.
0.07