And here is one that does (seem to) work.
For some reason, the use of GetSingleShieldPercentage was not reporting the right figures directly after a RedistributeShields, but through my method of setting the maximum shields to 1 and setting the current shields to the percentage, and then restoring the right max value after the redistribution it is now properly working (the new percentage is the same value as the current shield value).
I'm considering also redoing GetSingleShieldPercentage, but I don't (yet) know if it's that usefull. I mean, I doubt a lot of people would want to do the exact same thing I was doing.