[PATCH] Check for end of stack trace before falling back