Fix resolving inherit_gem
in remote configs
#7990
Merged
inherit_gem
in remote configs
#7990