Protect loop if we only have two elements