Use disposer to handle races where the callback might be called before the disposable is setup.

#1479
Updated the test to be synchronous.