glpi: Refs #1996 Fixing bad performance when deploy

When adding a command to dyngroup, bad sql query was generated, with bad
joins.