Maybe the wax was tallow-based. No wonder it attracted flies. Yech.
I've been trying to find a recipe online of what might be used in the army for black or white belts. It ought to be findable, but seems it's as well hidden as military tactics and fort plans.

I do see some 19th Century recipes for leather treatments that include tallow, suet, and various fat-based substances. (edited to add--I don't remember tallow candles attracting flies, except moths and the usual bugs when they were lit, and don't recall anyone complaining about gnats or flies around their tallow candles.)
Other stuff, like lampblack, varnish and things like that wouldn't be attractive to flies, I don't think. But I wonder if it had something to do with animal fat. Still, that's odd, because flies are usually attracted to fruit-based stuff. Fruit flies, vinegar gnats, those little gnats that fly around bananas. I've followed a recipe for black leather dye that included vinegar. Would the vinegar smell be enough to attract flies once it went on the leather? I was never doing enough for that to happen, not like a whole barracks.
Can't find what I used, but there's the premium blacking here:
https://books.google.com/books?id=7JVEAQAAMAAJ&pg=PA63
"Premium Blacking. Take of ivory black and treacle [molasses=flies],
each 12 ounces, spermaceti oil four ounces [whale oil--animal fat--flies?],
white wine vinegar [vinegar gnats?],
four pints, mix."
I'm pretty much stumped.