SceneObject: fix groups() and ids() implementation