Prevent callback from being called after control is disposed. Fixes #1317.