Merge "Bug fixes and testing support for DiscreteRegistry" into sc-dev