Learning to Make Coherent Predictions in Domains with Discontinuities