Arduino Due Unpredictable Analog Input Behavior

A few things to check:
There may have been recent changes to ADC in the latest IDE version or nightly build.
There are problems and workarounds for ADC discussed in section 49.2.4 (page 1454) of the SAM3X datasheet.
A DAC solution from another thread: