Re-ordered callback fixing to before pending check to prevent double callback of pending bundles.
2.36.1

merged #537