Fixed string length check in LayerMapping