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