Do not calculate the same value twice