Looks interesting. Exactly how are columns added and how do you trigger your function? Adding a column in the property panel would trigger a setProperty call which would update the client side model. If you call get data before the modification is ready you might get this result, but there might be another reason. You would probably need to check the browser console and follow the calls on the website. Specifically check the order of setProperties and getHypercubeData calls.
Thanks for the assistance so far. Some answer's to your questions:
The function is triggered whenever data needs to be refreshed.
It will be called when a single column is added, or if a property is changed (as this seems to refresh the data, even if the property doesn't actually change anything about the data itself). The rows defined in IntialDataFetch are fetched correctly, but for any extra rows after that (fetched via the function specified) the cells in the last column are not present.
What's the best way to check the SetProperties/GetHypercubeData calls? Just some adding some breakpoints in the browser?