Group key id as symbols

Further to previous commit to allow in mysql environment