Fixing analysis json bug exposed by making an example for Nick. Adding two related unit tests, both of which pass now.