Prevent double calculation of containing class