Cleaned up write path for krecords with linking.