fix and test case for #19

Test if the function passed to `unbind` was actually registered before splicing.