Noted, thanks.

Unfortunately, I don't have time to explore every possibility for what 'could be done' here. This can be left as an potential optimisation to be explored for the future. 

Presently my only interest is in getting these bugfixes and 'known good' optimisations into master.