It is as simple as:
var myLayer = map.getLayer("USA_Tapestry_335");
Do you have to hard-code the value? Isn't it possible to just do something like:
var activeLayers = this.map.getLayers();
// process layers in a for-each loop or similar...