That particular bit of code is ~4 years old, so you could also try to rejig it with the newer HTML widget. Could you upload a scrambled sample document that demonstrates the problem?
On Kobo you don't need to build anything to play around with the code btw. For most things like this you can just edit the Lua files directly on the device itself. But be careful, they will be overwritten if you update so you'd better make sure to keep a copy if you do.