core: Fix reference count leak for default context

If the default context was created but failed to fully initialize,
the reference count was not decremented appropriately.