Do not fail when last element in attribute path has a dot

We were not substituting the MAGIC_DOT string for the last element.