Speed up nan-handling on curves. Add test case for this.
Authored by: mdboom 2009-02-05
Parent: [r6881]
Child: [r6883]