Unreviewed, fix assertion failures in API tests after r243159.