introduce flag to allow "invalid nesting"