Prevent timeout when calling chart.reflow as an API call. Closes #2224.