Issue #34: Prevent leaking stat_result objects