Fix for issue #151: problems with (a+b)[x]

This PR should fix infinite recursion and missing parens formatting (a+b)[x]