Through the back end support ticket, we were able to discover that the names that were getting the brackets misplaced were caused by having another name that was a subset of the first one. For example, the longer name would be abcdefg and the shorter name would be abc and the bracket would look like this: [abc]defg instead of [abcdefg]. This only happens if the longer name starts with the shorter name.
To get around this, you can change the bracket position manually or make a copy of the correct formula and paste the formula in each time you need to edit the calculation.