Enable a test that had previously failed
Protect against null pointer
use dat1IsStructure

rather than attempting to look at group_id
Add HDS grouping test
hdsFree is allowed to do nothing

Do not complain if this is called as it is documented to do
nothing unless hdsLock has been called.