diff --git includes/context.inc includes/context.inc
index c32477f..a198559 100644
--- includes/context.inc
+++ includes/context.inc
@@ -229,8 +229,9 @@ function drush_set_config_special_contexts(&$options) {
 
     // Copy site aliases and command-specific options into their
     // appropriate caches.
-    foreach (array('site-aliases', 'command-specific') as $option_name) {
-      if ((isset($options)) && (array_key_exists($option_name, $options))) {
+    $special_contexts = drush_get_special_keys();
+    foreach ($special_contexts as $option_name) {
+      if (isset($options[$option_name])) {
         $cache =& drush_get_context($option_name);
         $cache = array_merge($cache, $options[$option_name]);
         unset($options[$option_name]);
diff --git includes/drush.inc includes/drush.inc
index 904ef89..1e1f598 100644
--- includes/drush.inc
+++ includes/drush.inc
@@ -1883,6 +1883,36 @@ function drush_memory_limit() {
 }
 
 /**
+ * Helper function to obtain the keys' name that need special handling in certain
+ * cases.
+ *
+ * @param $more_keys
+ *   Optional non-associative array containing the keys' name that will be added to
+ *   the default values.
+ * @param $with_defaults
+ *   A boolean value, default to TRUE. If FALSE the default values (i.e.,
+ *   'site-aliases' and 'command-specific') will be ignored.
+ * @return
+ *   A non-associative array containing the needed keys' name, or an empty array
+ *   if the assigned parameters are not the wished ones.
+ */
+function drush_get_special_keys($more_keys = NULL, $with_defaults = TRUE) {
+  if ($with_defaults) {
+    $special_keys = array(
+      'command-specific',
+      'site-aliases',
+    );
+    if (isset($more_keys) && is_array($more_keys)) {
+      $special_keys = array_merge($special_keys, $more_keys);
+    }
+  }
+  elseif (isset($more_keys) && is_array($more_keys)){
+    $special_keys = $more_keys;
+  }
+  return $special_keys ? $special_keys : array();
+}
+
+/**
  * Unset the named key anywhere in the provided
  * data structure.
  */
diff --git includes/sitealias.inc includes/sitealias.inc
index 6f6a726..d5cd94e 100644
--- includes/sitealias.inc
+++ includes/sitealias.inc
@@ -445,7 +445,7 @@ function _drush_sitealias_find_and_load_alias($aliasname, $alias_path_context =
         // a site-list of all of the aliases in the file
         if (substr($filename, -20) == ".aliases.drushrc.php") {
           $group_name = basename($filename,".aliases.drushrc.php");
-          if (!array_key_exists($group_name, $aliases)) {
+          if (!empty($aliases) && !array_key_exists($group_name, $aliases)) {
             $alias_names = array();
             foreach (array_keys($aliases) as $one_alias) {
               $alias_names[] = "@$one_alias";
@@ -495,16 +495,20 @@ function _drush_sitealias_find_and_load_alias($aliasname, $alias_path_context =
  */
 function _drush_sitealias_add_inherited_values(&$aliases) {
   foreach ($aliases as $alias_name => $alias_value) {
-    if (array_key_exists('parent', $alias_value)) {
+    if (isset($alias_value['parent'])) {
       // Prevent circular references from causing an infinite loop
       _drush_sitealias_cache_alias($alias_name, array());
       // Fetch and merge in each parent
       foreach (explode(',', $alias_value['parent']) as $parent) {
         $parent_record = drush_sitealias_get_record($parent);
-        if ($parent_record != NULL) {
-          unset($parent_record['name']);
-          $aliases[$alias_name] = array_merge($parent_record, $aliases[$alias_name]);
+        unset($parent_record['name']);
+        $array_based_keys = drush_get_special_keys(array('path-aliases'));
+        foreach ($array_based_keys as $array_based_key) {
+          if (isset($aliases[$alias_name][$array_based_key]) && isset($parent_record[$array_based_key])) {
+            $aliases[$alias_name][$array_based_key] = array_merge($parent_record[$array_based_key], $aliases[$alias_name][$array_based_key]);
+          }
         }
+        $aliases[$alias_name] = array_merge($parent_record, $aliases[$alias_name]);
       }
       unset($aliases[$alias_name]['parent']);
     }
@@ -1258,7 +1262,7 @@ function drush_sitealias_set_alias_context($site_alias_settings, $prefix = '') {
   $options = drush_get_context('alias');
 
   // There are some items that we should just skip
-  $skip_list = array('site-aliases', 'command-specific');
+  $skip_list = drush_get_special_keys();
   // Also skip 'remote-host' and 'remote-user' if 'remote-host' is actually
   // the local machine
   if (array_key_exists('remote-host', $site_alias_settings) && drush_is_local_host($site_alias_settings['remote-host'])) {
