Fixed off-by-one error when last port is a waypoint
Authored by: breese 2011-02-19
Parent: [r13049]
Child: [r13051]