Reflection serialzation: move post hooks to the finally block.