The implementation is difficult to get right. Keep checkapk simple. Fixes !229 This reverts commit acfa7d67.