regen/mk_invlists.pl: Remove unnecessary #if's

Even though this file is not intended to be human consumable, it is
annoying to see #if ... #endif #if ...
where the #endif and #if could be consolidated.

It turns out not to be hard to do that.