Attempt to fix nested block-type critical sections bug