Killing Yergius at the sheriff's request should not make you head of the thieves' guild
The 7000 gold piece reward for the Kill Yergius quest gets heavily counteracted by the worse prices you receive for being the new head of the thieves' guild. As the character is bringing Yergius to justice on behalf of the sheriff, it would make sense for both story and gameplay if killing him didn't make you the head of thieves' guild in this situation.