Added test to cover constraint overwrite problem