That example is very complex. A simpler one with a test case that simulates the problem would be nice.