(More thoroughly) Closes #1322.

Based on `import_old_kf` branch. Merge after that.