By the time the EndCommand event fires, all the objects should be closed, so in the ObjectAdded Event, just store the ObjectId of the block reference in a global variable. Then, in the EndCommand event, check to see if the global variable for the ObjectId is non-null, and if it is do your processing there. Then nullify the global variable.
Clear as mud?