Only close Augeas handler in augopen_internal when block is given