CorridorExtension.AddRegion ..........strange behavior

Hello all,

I had created a corridor using dynamo and added a region for 100m length. when i changed the stations our of this 100m range the region is not updated. (say first run the stations are 100 to 200 and next run the stations are 400 to 500) but if i change station start for new region in between first region then corridor gets updated correctly. (say 100 to 200 and next run is between 190 to 400). Any way around this behavior ?

Thanks for support and reply. File and code attached here for test runs.
Corridor_Region

Forum_Test.dwg (1.8 MB)
Test_delete.dyn (47.7 KB)