Fix: Ensure result of indexOf >= 0 before using when unsubscribing

Calling view.unbind() more that once will result in the callback not
being found (indexOf returns -1).

Calling splice with an index of -1 will remove the last item in the
list.

Instead, check the result if indexOf before using it and skip the
splice when the callback was not found.