title: ConstraintLayout Barrier not working properly when parent dimensions are set to wrap_content
body: <p>Here's a reproduction of my issue:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;wrap_content&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;&gt;
      
      &lt;TextView
          android:id=&quot;@+id/textView&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot; 
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          app:layout_constraintEnd_toStartOf=&quot;@id/textView2&quot;
          android:text=&quot;Text&quot;/&gt;
      
      &lt;TextView
          android:id=&quot;@+id/textView2&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintStart_toEndOf=&quot;@id/textView&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          android:layout_marginStart=&quot;16dp&quot;
          android:text=&quot;muchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertext&quot;/&gt;
      
      &lt;android.support.constraint.Barrier
          android:id=&quot;@+id/barrier&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot; 
          app:barrierDirection=&quot;bottom&quot;
          app:constraint_referenced_ids=&quot;textView, textView2&quot;/&gt;
      
      &lt;TextView
          android:id=&quot;@+id/textView3&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          app:layout_constraintTop_toBottomOf=&quot;@id/barrier&quot;
          android:text=&quot;muchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertextmuchlongertext&quot;/&gt;
      
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  <p>When you set the parent height to <code>match_parent</code>, the Barrier works as intended. But, as soon as you set it to <code>wrap_content</code>, it doesn't do the layout properly.</p>
  <p>Here's how it looks with <code>wrap_content</code>, and at the right with <code>match_parent</code>:</p>
  <img src="https://i.stack.imgur.com/mLmht.png" width="250">
  <img src="https://i.stack.imgur.com/XTWwi.png" width="250">
  <p>If anyone could point me in the right direction it would be much appreciated. I didn't find anyone advocating against using Barriers this way, but didn't find anyone who got that kind of layout working.</p>
  <p>Is that a mistake on my part or is that a bug in Barrier?</p>