Support static option in batch mode

Fixes #14844