Try using the Prefix tab instead of the Title Prefix box, for this kind of stuff. It’s be a more comfortable space to work in anyway, but more importantly it doesn’t have this particular bug!
By the way, given what it looks like you are doing, I figured it worth mentioning that I wrote a simple JSON compile format a while back; maybe it will have some ideas you can use from it.