fix(cli): enhancing object flattening as it breaks objects within capabilities object such as proxy

Tackled this problem after #1029 was closed.  Instead of removing object flattening completely, I've set it up so that it will ignore flattening proxy objects.  This will leave the proxy object intact. 
Can you add a comment about why this silliness is needed?