Your change added a *second* test, for substitution of
(set (reg Y) (...(some use of reg X)...))
into
(parallel [ ...(some use of reg Y)... (clobber (reg X)) ...])
It this *this* check I don't understand.
I think it's indeed the earlyclobber issue: you can't be sure that the
clobber will happen before X is read.