The network actually learns correctly, and gradient calculations etc seem fine.
Note that this isn't just a UI issue - the score reported by the score iteration listener is also incorrect, when the UI is added.
Remove the UI and the reported scores are fine.
UI + native is fine. CUDA + UI + windows is fine.