Looping MIDIs is perhaps possible...consider where FF7 gets it's looping information from. Probably the MIDI files themselves, I'm pretty sure from the LGP files. So, to make a song restart, simply edit the LGP archive after the battle to make the song start at the right place.
Of course it is anything but simple. Perhaps FF7 caches the LGP header, which would make it impossible. Perhaps FF7 caches many MIDI files at the time, which would make it impossible. And, editing the entire LGP file each time a battle is fought is close to impossible...so what to do? OK, remember that I am only schetching a technical possibility here, it would be an insane waste of time to start programming on it, it's just interesting...
What you do is to code a layer between FF7 and the LGP files. The Windows API file read/write functions can be replaced with your own versions (I think all Windows Apps use the FileRead function for file reading) which can return anything it wishes. When that is done it is of course just to start assembling new MIDI-files each time a certain midi-file is requested...
I know it is a lame idea, only wanted to say how I imagine it could work in practice. People, please don't ask Ficedula to do this, because it is an insane amount of work simply to do something as useless as avoiding restart of midifiles.