OFApplication: Fix MorphOS LocalVar list iteration

Double linked lists on MorphOS/AmigaOS have the last node point back to
the list head, so checking the successor for NULL is not correct, as
this will then include the list head which has no payload.