Yes but at Leeds you would never attach a portion again if this was the case. We simply cannot budget for every potential eventuality. If in doubt fine don't do it. But not allowing people off doesn't make the platform empty.
I have no doubt that this is the case but it still doesn't change that there is a safety argument that letting everyone off and then carrying out the attachment is more or less safe. I know what I would do and I know what happens at my TOC but the there is no significant difference to really state clearly that one way is 'safer' than the other because you need to consider all the risks involved. A decision was made to couple whilst passengers were on board. Was that safe ? Yes. Was it the safest option ? Crikey no. They could have detrained, physically checked each unit to clear passengers, cleared the platform of all passengers and non essential staff and then carried out the attachment.