This should move to below the (maxkeys == 0) condition.