The main issue is that PlantUML does not define any namespace.
Even if "NotBob" is defined twice, from a PlantUML point-of-view, there are only one "NotBob".
This is really a initial design decision which is not easy to change now (because it may impact existing diagrams).
However, a workaround is possible by renaming nodes:
@startuml
node "outer1" {
node "Should not contain sub-subnode Bob" {
node "NotBob" as NotBob1 {
}
}
node "NotBob" {
node "Bob" {
}
}
}
@enduml
Is it an acceptable solution for you ?