031496ff0d
This is done by making sure that when empty() is called on a context, the grants Arc will be replaced with a new unused Arc, hence decrementing the refcount. Previously this was only done when the context was actually reaped, but since there is no guarantee as far as I am aware about when this must happen, the grants could be completely leaked, leading to the error.