Push and pop directive sub state.

Closes #188.