There was a large FIXME next to this call that this should be done in
the pasteSelectionHelper,
//FIXME: We should call setBuffer() on each inserted paragraph.
// instead, we call setBuffer() for the main inset at the beginning
// of updateLabels()
IIRC this was your FIXME ;-)....
We came to this because of some bug which apparently wanted to have
access to the buffer before updateLabels was called, I don't know the
details anymore.
That was bug http://www.lyx.org/trac/ticket/5813.
After fixing this bug by adding the routine to pasteSelectionHelper,
Richard removed it from updateLabels to see what would happen.
Vincent