Add unit tests for previously-uncovered branches and fix registration issues found in PR #8088 review.