Add test case and fix for nested use of .one() function

This prevents the callback from being run infinitely, by ensuring that the unbind occurs first.