Add support for primitive restart.