I cannot reproduce on Mathlib (which was the Lean project I happened to have open when I read your question)
buzzard@brutus:~/mathlib/Mathlib$ cat > A.lean
namespace inner
buzzard@brutus:~/mathlib/Mathlib$ cat > B.lean
namespace inner
buzzard@brutus:~/mathlib/Mathlib$ cat > C.lean
import Mathlib.A
import Mathlib.B
I can open C.lean
without any errors. Indeed this pattern is commonplace in mathlib. Are you sure you've diagnosed your problem correctly?