diff --git a/pyhocon/config_parser.py b/pyhocon/config_parser.py
index 6846589..52a06cb 100644
--- a/pyhocon/config_parser.py
+++ b/pyhocon/config_parser.py
@@ -125,6 +125,10 @@ def period(period_value, period_unit):
     return period_impl(**arguments)
 
 
+U_KEY_SEP = unicode('.')
+U_KEY_FMT = unicode('"{0}"')
+
+
 class ConfigFactory(object):
 
     @classmethod
@@ -868,6 +872,14 @@ class ConfigTreeParser(TokenConverter):
                         config_tree.put(key, value, False)
                     else:
                         existing_value = config_tree.get(key, None)
+                        parsed_key = ConfigTree.parse_key(key)
+                        key = parsed_key[0]
+                        if len(parsed_key) > 1:
+                            # Special case when the key contains path (i.e., `x.y = v`)
+                            new_value = ConfigTree()
+                            new_value.put(U_KEY_SEP.join(U_KEY_FMT.format(k) for k in parsed_key[1:]), value)
+                            value = new_value
+
                         if isinstance(value, ConfigTree) and not isinstance(existing_value, list):
                             # Only Tree has to be merged with tree
                             config_tree.put(key, value, True)
diff --git a/setup.py b/setup.py
index dad12e4..2d6b631 100755
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,10 @@ setup(
     packages=[
         'pyhocon',
     ],
-    install_requires=['pyparsing~=2.0'],
+    install_requires=[
+        'pyparsing~=2.0;python_version<"3.0"',
+        'pyparsing>=2,<4;python_version>="3.0"',
+    ],
     extras_require={
         'Duration': ['python-dateutil>=2.8.0']
     },

diff --git a/tests/test_config_parser.py b/tests/test_config_parser.py
index 13a130f..c4ce46a 100644
--- a/tests/test_config_parser.py
+++ b/tests/test_config_parser.py
@@ -19,7 +19,6 @@ try:
 except Exception:
     from datetime import timedelta as period
 
-
 class TestConfigParser(object):
     def test_parse_simple_value(self):
         config = ConfigFactory.parse_string(
@@ -606,6 +605,58 @@ class TestConfigParser(object):
             'cluster-size': 6
         }
 
+    def test_dict_substitutions2(self):
+        config = ConfigFactory.parse_string(
+            """
+                data-center-generic = { cluster-size = 6 }
+                data-center-east = ${data-center-generic}
+                data-center-east.name = "east"
+            """
+        )
+
+        assert config.get('data-center-east.cluster-size') == 6
+        assert config.get('data-center-east.name') == 'east'
+
+        config2 = ConfigFactory.parse_string(
+            """
+                data-center-generic = { cluster-size = 6 }
+                data-center-east.name = "east"
+                data-center-east = ${data-center-generic}
+            """
+        )
+
+        assert config2.get('data-center-east.cluster-size') == 6
+        assert config2.get('data-center-east.name') == 'east'
+
+        config3 = ConfigFactory.parse_string(
+            """
+                data-center-generic = { cluster-size = 6 }
+                data-center-east.name = "east"
+                data-center-east = ${data-center-generic}
+                data-center-east.cluster-size = 9
+                data-center-east.opts = "-Xmx4g"
+            """
+        )
+
+        assert config3.get('data-center-east.cluster-size') == 9
+        assert config3.get('data-center-east.name') == 'east'
+        assert config3.get('data-center-east.opts') == '-Xmx4g'
+
+        config4 = ConfigFactory.parse_string(
+            """
+                data-center-generic = { cluster-size = 6 }
+                data-center-east.name = "east"
+                data-center-east = ${data-center-generic}
+                data-center-east-prod = ${data-center-east}
+                data-center-east-prod.tmpDir=/tmp
+            """
+        )
+
+        assert config4.get('data-center-east.cluster-size') == 6
+        assert config4.get('data-center-east.name') == 'east'
+        assert config4.get('data-center-east-prod.cluster-size') == 6
+        assert config4.get('data-center-east-prod.tmpDir') == '/tmp'
+
     def test_dos_chars_with_unquoted_string_noeol(self):
         config = ConfigFactory.parse_string("foo = bar")
         assert config['foo'] == 'bar'

ConfigFactory Parse File update after substitution incorrect
If I have a config called `test.conf`
```
test: {
  a: 1
  b: 2
}
test2: ${test}
test2.c: 3
```
I would expect
```
conf = ConfigFactory.parse_file("test.conf")
print(conf.get("test2"))
```
to print `{a:1, b:2, c:3}` but it just prints `{c:3}`. 
tests/test_config_parser.py::TestConfigParser::test_dict_substitutions2
tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[`] tests/test_config_parser.py::TestConfigParser::test_multiple_substitutions tests/test_config_parser.py::TestConfigParser::test_parse_with_enclosing_square_bracket tests/test_config_parser.py::TestConfigParser::test_self_merge_ref_substitutions_object tests/test_config_parser.py::TestConfigParser::test_fallback_with_resolve tests/test_config_parser.py::TestConfigParser::test_string_from_environment tests/test_config_parser.py::TestConfigParser::test_quoted_strings_with_ws tests/test_config_parser.py::TestConfigParser::test_include_dict_from_samples tests/test_config_parser.py::TestConfigParser::test_resolve_package_path_format tests/test_config_parser.py::TestConfigParser::test_self_ref_child tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set6] tests/test_config_parser.py::TestConfigParser::test_non_compatible_substitution tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[?] tests/test_config_parser.py::TestConfigParser::test_concat_multi_line_string tests/test_config_parser.py::TestConfigParser::test_plain_ordered_dict tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_string_opt_concat tests/test_config_parser.py::TestConfigParser::test_fallback_substitutions_overwrite tests/test_config_parser.py::TestConfigParser::test_complex_substitutions tests/test_config_parser.py::TestConfigParser::test_multiline_with_backslash tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set8] tests/test_config_parser.py::TestConfigParser::test_quoted_unquoted_strings_with_ws tests/test_config_parser.py::TestConfigParser::test_from_dict_with_ordered_dict tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set0] tests/test_config_parser.py::TestConfigParser::test_parse_with_comments tests/test_config_parser.py::TestConfigParser::test_bool_from_environment tests/test_config_parser.py::TestConfigParser::test_quoted_unquoted_strings_with_ws_substitutions tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set12] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set3] tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[?] tests/test_config_parser.py::TestConfigParser::test_dos_chars_with_quoted_string_noeol tests/test_config_parser.py::TestConfigParser::test_dos_chars_with_triple_quoted_string_noeol tests/test_config_parser.py::TestConfigParser::test_substitutions_overwrite tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set30] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set17] tests/test_config_parser.py::TestConfigParser::test_assign_strings_with_eol tests/test_config_parser.py::TestConfigParser::test_from_dict_with_dict tests/test_config_parser.py::TestConfigParser::test_cascade_optional_substitution tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters_in_context[$] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set18] tests/test_config_parser.py::TestConfigParser::test_one_line_quote_escape tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set10] tests/test_config_parser.py::TestConfigParser::test_dotted_notation_merge tests/test_config_parser.py::TestConfigParser::test_non_existent_substitution tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set7] tests/test_config_parser.py::TestConfigParser::test_multi_line_escape tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration_with_long_unit_name tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[^] tests/test_config_parser.py::TestConfigParser::test_bad_concat tests/test_config_parser.py::TestConfigParser::test_merge_overriden tests/test_config_parser.py::TestConfigParser::test_comma_to_separate_expr tests/test_config_parser.py::TestConfigParser::test_substitution_nested_override tests/test_config_parser.py::TestConfigParser::test_list_of_lists tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set33] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set9] tests/test_config_parser.py::TestConfigParser::test_substitution_list_with_append tests/test_config_parser.py::TestConfigParser::test_parse_with_list_mixed_types_with_durations_and_trailing_comma tests/test_config_parser.py::TestConfigParser::test_self_append_nonexistent_array tests/test_config_parser.py::TestConfigParser::test_assign_next_line tests/test_config_parser.py::TestConfigParser::test_cascade_string_substitutions tests/test_config_parser.py::TestConfigParser::test_parse_URL_from_samples tests/test_config_parser.py::TestConfigParser::test_concat_multi_line_dict tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set15] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set1] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set25] tests/test_config_parser.py::TestConfigParser::test_string_substitutions tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_path_hide tests/test_config_parser.py::TestConfigParser::test_parse_with_enclosing_brace tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set19] tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters_in_context["] tests/test_config_parser.py::TestConfigParser::test_escape_quote_complex tests/test_config_parser.py::TestConfigParser::test_self_append_object tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set27] tests/test_config_parser.py::TestConfigParser::test_list_of_dicts tests/test_config_parser.py::TestConfigParser::test_assign_int tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set2] tests/test_config_parser.py::TestConfigParser::test_include_dict tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set24] tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[*] tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_recurse tests/test_config_parser.py::TestConfigParser::test_list_substitutions tests/test_config_parser.py::TestConfigParser::test_issue_75 tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set14] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set26] tests/test_config_parser.py::TestConfigParser::test_dos_chars_with_int_noeol tests/test_config_parser.py::TestConfigParser::test_mutation_values tests/test_config_parser.py::TestConfigParser::test_concat_dict tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_merge tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[@] tests/test_config_parser.py::TestConfigParser::test_resolve_package_path_missing tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set4] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set21] tests/test_config_parser.py::TestConfigParser::test_from_dict_with_nested_dict tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set23] tests/test_config_parser.py::TestConfigParser::test_assign_dict_strings_with_equal_sign_with_eol tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[!] tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[!] tests/test_config_parser.py::TestConfigParser::test_include_missing_required_file tests/test_config_parser.py::TestConfigParser::test_string_from_environment_self_ref_optional tests/test_config_parser.py::TestConfigParser::test_triple_quotes_same_line tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[`] tests/test_config_parser.py::TestConfigParser::test_object_concat tests/test_config_parser.py::TestConfigParser::test_self_append_string tests/test_config_parser.py::TestConfigParser::test_assign_number_with_eol tests/test_config_parser.py::TestConfigParser::test_escape_quote tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set31] tests/test_config_parser.py::TestConfigParser::test_escape_sequences_json_equivalence tests/test_config_parser.py::TestConfigParser::test_self_ref_substitiotion_dict_in_array tests/test_config_parser.py::TestConfigParser::test_attr_syntax tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_recurse_part tests/test_config_parser.py::TestConfigParser::test_list_of_lists_with_merge tests/test_config_parser.py::TestConfigParser::test_fallback_self_ref_substitutions_merge tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[@] tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_array_to_dict tests/test_config_parser.py::TestConfigParser::test_assign_float tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[*] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set32] tests/test_config_parser.py::TestConfigParser::test_parse_simple_value tests/test_config_parser.py::TestConfigParser::test_concat_list tests/test_config_parser.py::TestConfigParser::test_substitution_cycle tests/test_config_parser.py::TestConfigParser::test_optional_substitution tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_recurse2 tests/test_config_parser.py::TestConfigParser::test_pop tests/test_config_parser.py::TestConfigParser::test_self_append_nonexistent_object tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[&] tests/test_config_parser.py::TestConfigParser::test_substitution_override tests/test_config_parser.py::TestConfigParser::test_string_substitutions_with_no_space tests/test_config_parser.py::TestConfigParser::test_assign_list_strings_with_eol tests/test_config_parser.py::TestConfigParser::test_self_merge_ref_substitutions_object2 tests/test_config_parser.py::TestConfigParser::test_fallback_self_ref_substitutions_append tests/test_config_parser.py::TestConfigParser::test_list_of_dicts_with_merge tests/test_config_parser.py::TestConfigParser::test_sci_real tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_otherfield tests/test_config_parser.py::TestConfigParser::test_self_append_array tests/test_config_parser.py::TestConfigParser::test_parse_null tests/test_config_parser.py::TestConfigParser::test_include_glob_dict_from_samples tests/test_config_parser.py::TestConfigParser::test_substitution_multiple_override tests/test_config_parser.py::TestConfigParser::test_string_from_environment_self_ref tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set20] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set11] tests/test_config_parser.py::TestConfigParser::test_parse_URL_from_invalid tests/test_config_parser.py::TestConfigParser::test_dict_merge tests/test_config_parser.py::TestConfigParser::test_fallback_self_ref_substitutions_concat_string tests/test_config_parser.py::TestConfigParser::test_parse_override tests/test_config_parser.py::TestConfigParser::test_int_substitutions tests/test_config_parser.py::TestConfigParser::test_dict_substitutions tests/test_config_parser.py::TestConfigParser::test_concat_multi_line_list tests/test_config_parser.py::TestConfigParser::test_object_field_substitution tests/test_config_parser.py::TestConfigParser::test_with_comment_on_last_line tests/test_config_parser.py::TestConfigParser::test_self_merge_ref_substitutions_object3 tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[&] tests/test_config_parser.py::TestConfigParser::test_unicode_dict_key tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_path tests/test_config_parser.py::TestConfigParser::test_fallback_non_root tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_object tests/test_config_parser.py::TestConfigParser::test_int_from_environment tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set5] tests/test_config_parser.py::TestConfigParser::test_fail_parse_forbidden_characters[+] tests/test_config_parser.py::TestConfigParser::test_keys_with_slash tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set16] tests/test_config_parser.py::TestConfigParser::test_var_with_include_keyword tests/test_config_parser.py::TestConfigParser::test_dos_chars_with_float_noeol tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_otherfield_merged_in tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_array tests/test_config_parser.py::TestConfigParser::test_invalid_dict tests/test_config_parser.py::TestConfigParser::test_fallback_substitutions_overwrite_file tests/test_config_parser.py::TestConfigParser::test_self_ref_substitution_dict_otherfield_merged_in_mutual tests/test_config_parser.py::TestConfigParser::test_fallback_self_ref_substitutions_append_plus_equals tests/test_config_parser.py::TestConfigParser::test_include_package_file tests/test_config_parser.py::TestConfigParser::test_self_append_non_existent_string tests/test_config_parser.py::TestConfigParser::test_assign_list_numbers_with_eol tests/test_config_parser.py::TestConfigParser::test_include_glob_list_from_samples tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[+] tests/test_config_parser.py::TestConfigParser::test_optional_with_merge tests/test_config_parser.py::TestConfigParser::test_include_substitution tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set34] tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set22] tests/test_config_parser.py::TestConfigParser::test_parse_forbidden_characters_quoted[^] tests/test_config_parser.py::TestConfigParser::test_substitution_flat_override tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set28] tests/test_config_parser.py::TestConfigParser::test_list_element_substitution tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set29] tests/test_config_parser.py::TestConfigParser::test_include_missing_file tests/test_config_parser.py::TestConfigParser::test_include_file tests/test_config_parser.py::TestConfigParser::test_resolve_package_path tests/test_config_parser.py::TestConfigParser::test_missing_config tests/test_config_parser.py::TestConfigParser::test_include_required_file tests/test_config_parser.py::TestConfigParser::test_substitution_list_with_append_substitution tests/test_config_parser.py::TestConfigParser::test_parse_string_with_duration[data_set13] tests/test_config_parser.py::TestConfigParser::test_unquoted_strings_with_ws tests/test_config_parser.py::TestConfigParser::test_dos_chars_with_unquoted_string_noeol tests/test_config_parser.py::TestConfigParser::test_concat_string tests/test_config_parser.py::TestConfigParser::test_quoted_key_with_dots tests/test_config_parser.py::TestConfigParser::test_assign_dict_strings_no_equal_sign_with_eol tests/test_config_parser.py::TestConfigParser::test_invalid_assignment tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set4] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set9] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set2] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set10] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set0] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set1] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set6] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set3] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set7] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set8] tests/test_config_parser.py::test_parse_string_with_duration_optional_units[data_set5]