Heavily starching the flannel before layering would probably have prevented this problem (1:1 solution of Sta-Flo liquid laundry starch and water).
At this point, you could try multiple layers of spray starch on the flannel. It might stabilize the flannel sufficiently for the decorative stitching.