It's the justice of the peace who will make the decision as to whether or not the individual will be released. It's the sentencing judge who will deal with the credit issue if the person has been in custody until the trial and sentencing.
I may not have understood your question correctly.
So there are two different decisions that are made: one at the bail stage by the JP and the other by the sentencing judge at sentencing. He will need to know whether or not the reason the JP sent the person to remand custody was because of the matter of his record. The other matter that appeared in the government's platform and is covered in the bill relates to whether or not the individual breached a condition. That's dealt with by the amendment to section 524.