Tests and fixes for restrict-to-max-oc, capacity-missing, period-to-missing and test-book-oc.