prevent errors when listing broken memberships

If the other side of the membership has been deleted then skip over
listing the details to prevent errors.
we need to leave the li in place as otherwise the code that attaches
edit events to this, which currently doesn't know about the contents of
memberships, relies on them being there to assign id data correctly.

Fixes #405