I uploaded Voltage-Clamped-Current-Source.asc which has four five (three four, really) examples of adding a voltage clamp to an ideal current source. It is not an algorithmic approach, but it does the job.
I don't know why you got spikes with your diode and voltage source method. Did you use the ideal diode "D", or a real diode model?
Andy