Okay, I figured out a workaround; this adds a bunch of dummy entries to the subdirectories table where directory_id is missing (I inserted this in the sqllite migration script from the original post):
INSERT INTO strawberry.subdirectories(directory_id,path,mtime) SELECT 1, '/path/to/nowhere', '' WHERE NOT EXISTS(SELECT 1 FROM strawberry.subdirectories WHERE directory_id = 1);
INSERT INTO strawberry.subdirectories(directory_id,path,mtime) SELECT 2, '/path/to/nowhere', '' WHERE NOT EXISTS(SELECT 1 FROM strawberry.subdirectories WHERE directory_id = 2);
INSERT INTO strawberry.subdirectories(directory_id,path,mtime) SELECT 3, '/path/to/nowhere', '' WHERE NOT EXISTS(SELECT 1 FROM strawberry.subdirectories WHERE directory_id = 3);
INSERT INTO strawberry.subdirectories(directory_id,path,mtime) SELECT 4, '/path/to/nowhere', '' WHERE NOT EXISTS(SELECT 1 FROM strawberry.subdirectories WHERE directory_id = 4);
INSERT INTO strawberry.subdirectories(directory_id,path,mtime) SELECT 5, '/path/to/nowhere', '' WHERE NOT EXISTS(SELECT 1 FROM strawberry.subdirectories WHERE directory_id = 5);
...
This seems to have fixed the issue.