Attempt #1 at fixing an issue reported by user Serge here:

https://sourceforge.net/p/libmodsynth/discussion/general/thread/5ad4f9fd/