Fixed ORDER BY plus LIMIT, added test case.