Strange error in Mura CMS after upgrading beyond 5.1.0.34

Hi all!

I am running Mura CMS on Lucee, both on a Windows dev workstation (Tomcat 8.5) and on an Ubuntu production server (Tomcat 8.0) - both running Oracle Java 1.8

Since upgrading to any version beyond 5.1.0.34 I am seeing some strange errors when Mura tries to load my installed plugins on first request… I tried to isolate the problem, but Mura instatiates the plugin Application object very closely tied to the whole CMS…

On first request I get a strange

String index out of range: -6
Code:0
Type:java.lang.StringIndexOutOfBoundsException

…but if I just reload the page it resolves fine.

I reported it as a bug with steps to reproduce as https://luceeserver.atlassian.net/browse/LDEV-1349

Any tips on how to resolve this or for any workarounds are more than welcome, thanks in advance!