Modifications to allow replacement of test sources #3266