improves batch implementation to support nested openBatch calls. fixes #11436 !strict