title: Setter.TargetName does not work against an element from the BasedOn setting
body: <p>I have many PathGeometry instances that draw a variety of graphics for different buttons. So I have created a button type for showing a Path which then updates the Path.Stroke depending on the button state. So show it grayed when disabled and different colours when the mouse is over. Standard stuff...</p>
  
  <pre><code>&lt;Style x:Key="BasePathButton" TargetType="{x:Type Button}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                  &lt;Border Name="Border"
                      &lt;Path x:Name="Path" /&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsEnabled" Value="False"&gt;
                          &lt;Setter TargetName="Path" Property="Stroke" Value="Gray"/&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                          &lt;Setter TargetName="Path" Property="Stroke" Value="Green"/&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsPressed" Value="True"&gt;
                          &lt;Setter TargetName="Path" Property="Stroke" Value="Red"/&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>But obviously I need different Path.Data for each button instance. So I create a BasedOn style for setting the Path.Data like this...</p>
  
  <pre><code>&lt;Style x:Key="NLB" TargetType="{x:Type Button}" BasedOn="{StaticResource BasePathButton}"&gt;
      &lt;Setter TargetName="Path" Property="Data" Value="{StaticResource LeftPathGeometry}"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>...but this fails with an error that TargetName="Path" cannot be found. Any ideas how to fix this? Or maybe a better way to create a button that has a Path which is parameterized with the geometry to use?</p>