Fix and enable all internal links test cases, including two bugs