Recursive layer migration