Add layers iterators tests, fix layer iterators