It is pre-requisite for the change for composer sort code in the next PR - though with hindsight I could probably have done that slightly differently and avoided this code.

That said, I still think this is good code - because it avoids lines like the old one at 77.