Bundle registry tests

I seem to missed lost a few hunks from the automatic activity update pull request, which caused content bundles not to be tracked. Here they are, plus some tests that were requested that would also have uncovered this issue.