tests: add a sub-surface nesting loop test