As far as I see, modifying `isError` function (see also `isError(s->parent)`) is right direction.