Seems the easiest way to fix this would be to add CPU eligible revenue standby pax to the upgrade list simultaneously, just as it is done for nonrevs.
This would allow for Y to J upgrades as well as J to J if Y is full and prevent the situation the OP described.