See https://codepen.io/alexcjohnson/pen/VExvjr?editors=1010  whereas if I reverse all three arrays we get the correct result: 