Added support for nested sequences.