Avoid crash in links when references are disabled
Remove state.linkLevel

It's redundant after the changes in links algorithm.