Recalculate source ident hash only when needed

Signed-off-by: Michael Buesch <m@bues.ch>