Type-checking for propcache writes.
Fix checkwritable some more.
More test cases.
Tests for checkwritable.