Fix typo in setSecurityGroup when no GID is set yet

Likewise other attributes, set security group as lazy in CGI