Some fixes to the reference-counting in ENGINE code. First, there were a