Thanks for the clarification. When I say "public API functions to interact with your layers" I'm talking about using the methods and properties documented in the official docs, not just the JS/CSS files hosted on Esri servers.The finer points of the markup generated by the API isn't something we document and therefore is subject to change. That being said, I tried to repro this using the URL you posted but I'm still seeing the layer's ID show up in the main div for a layer and in the img tag that inserts the map image into the map. Here's some of the markup generated from the code at the end of this post:
<div id="map_layers" class="layersDiv">
<div id="map_layer0" style="position: absolute; left: 0px; top: 0px; width: 1354px; height: 521px; overflow: visible; display: block;">
<div id="map_dynamic" style="position: absolute; left: 0px; top: 0px; width: 1354px; height: 521px; overflow: visible; opacity: 1; display: block;">
<img id="map_dynamic_1321381345553" style="position: absolute; left: 0px; top: 0px; width: 1354px; height: 521px;" src="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/export?dpi=96&transparent=true&format=png8&bbox=-9181020.983518625%2C3176890.519266467%2C-9168084.016481375%2C3181868.480733533&bboxSR=102100&imageSR=102100&size=1354%2C521&f=image">
</div>
<div id="map_anno" style="position: absolute; left: 0px; top: 0px; width: 1354px; height: 521px; overflow: visible; opacity: 1; display: block;">
<img id="map_anno_1321381345556" style="position: absolute; left: 0px; top: 0px; width: 1354px; height: 521px;" src="http://www.mymanatee.org/arcgis/rest/services/common-operational/streetnames-for-aerials/MapServer/export?dpi=96&transparent=true&format=png8&bbox=-9181020.983518625%2C3176890.519266467%2C-9168084.016481375%2C3181868.480733533&bboxSR=102100&imageSR=102100&size=1354%2C521&f=image">
...<snip>...
layer0 is a tiled basemap layer, dynamic is a dynamic map service hosted on sampleserver1 and anno is your map service. Here's the full page:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title></title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.5/js/dojo/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.5/js/esri/dijit/css/Popup.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
#map{ margin: 0; padding: 0; }
</style>
<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.5"></script>
<script>
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
var map;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-9177466,"ymin":3177315,"xmax":-9171639,"ymax":3181444,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
var dyn = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer", {
"id": "dynamic"
});
map.addLayer(dyn);
var anno = new esri.layers.ArcGISDynamicMapServiceLayer("http://www.mymanatee.org/arcgis/rest/services/common-operational/streetnames-for-aerials/MapServer", {
"id": "anno"
});
map.addLayer(anno);
dojo.connect(map, 'onLoad', function() {
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
}
dojo.ready(init);
</script>
</head>
<body class="tundra">
<div data-dojo-type="dijit.layout.BorderContainer"
data-dojo-props="design:'headline',gutters:false"
style="width: 100%; height: 100%; margin: 0;">
<div id="map"
data-dojo-type="dijit.layout.ContentPane"
data-dojo-props="region:'center'">
</div>
</div>
</body>
</html>