title: GDAL appears to ignore NoDataValue
body: <p>I'm trying to build a mosaic, and I rely on the NoDataValue feature to treat some parts of the image as transparent.
  However, it appears that GDAL doesn't work as expected.</p>
  
  <p>I also created a very simple test case using a vrt dataset and gdal_translate - and I get the same results (that is - the 2nd image draws over the 1st image, ignoring "transparent areas")</p>
  
  <p>I have to 100X100 image files with a white marking (different in each file) over black background (black being exactly equal to 0)
  I built a simple vrt file:</p>
  
  <pre><code>&lt;VRTDataset rasterXSize="100" rasterYSize="100"&gt;
    &lt;VRTRasterBand dataType="Byte" band="1"&gt;
      &lt;ColorInterp&gt;Gray&lt;/ColorInterp&gt;
      &lt;SimpleSource&gt;
        &lt;SourceFilename relativeToVRT="1"&gt;a1.tif&lt;/SourceFilename&gt;
        &lt;SourceBand&gt;1&lt;/SourceBand&gt;
        &lt;SrcRect xOff="0" yOff="0" xSize="100" ySize="100"/&gt;
        &lt;DstRect xOff="0" yOff="0" xSize="100" ySize="100"/&gt;
        &lt;HideNoDataValue&gt;1&lt;/HideNoDataValue&gt;
        &lt;NoDataValue&gt;0&lt;/NoDataValue&gt;
      &lt;/SimpleSource&gt;
      &lt;SimpleSource&gt;
        &lt;SourceFilename relativeToVRT="1"&gt;a2.tif&lt;/SourceFilename&gt;
        &lt;SourceBand&gt;1&lt;/SourceBand&gt;
        &lt;SrcRect xOff="0" yOff="0" xSize="100" ySize="100"/&gt;
        &lt;DstRect xOff="0" yOff="0" xSize="100" ySize="100"/&gt;
        &lt;HideNoDataValue&gt;1&lt;/HideNoDataValue&gt;
        &lt;NoDataValue&gt;0&lt;/NoDataValue&gt;
      &lt;/SimpleSource&gt;
    &lt;/VRTRasterBand&gt;
  &lt;/VRTDataset&gt;
  </code></pre>
  
  <p>and I run the command:</p>
  
  <pre><code>gdal_translate mosaic.vrt mosaic.tif
  </code></pre>
  
  <p>The result is identical to image <code>a2.tif</code>, instead of being a combination of <code>a1.tif</code> and <code>a2.tif</code></p>
  
  <p>I got the error using gdal 1.8 and 1.9</p>
  
  <p>any ideas?</p>