Respect IS_DYNAMIC VariableAttribute flag when building variable path.

* When adding array elements to Watch, the variable path was incorrect, because array element index was delimited with "." instead of [ ]

Fixes #406
Merge pull request #508 from zobo/fix/issue-406

Respect IS_DYNAMIC VariableAttribute flag when building variable path.