Added a flag for avoiding hash recalculation