Eng 6221 orderbyindexedselfjoin

2 commits for ENG-6221, one to repro, one to fix -- and 1 commit to clear up the sqlcoverage backlog