Not sure if it is really a bug, but shouldn't the diagram display the $showgroup1 in this code?
@startuml
component A $hidegroup1 {
component A1 $showgroup1 {
}
}
component B {
component B1 {
}
}
A -- B
A1 -- B1
remove $hidegroup1
restore $showgroup1
@enduml
This is the actual result:
However, the desired result is that component A1 would be displayed too while (the parent) component A would stay hidden: