Expose internal state defensively to make it read-only
Re-fix link creation broken in automatic merge

Link creation fix bbba6a233336d5f8a6ed217ff233da3acd262c04 was
broken during automatic merge 091bf394ec598c5bca9e417c58ff4ee76b9fc288