fix wrong assert (especially when top=bottom=0)
_sequence was actually a local variable, so use it this way
add assert()s
signal an actual infinite loop
add more asserts (just got an error because a buffer was NULL)
check OFX status at each call
 some asserts may have to be adjusted, for example, in some cases, where the default action is OK,
    assert(stat == kOfxStatOK);
may have to be changed to
    assert(stat == kOfxStatOK || stat == kOfxStatReplyDefault);