Fix regressions for for-loop on singleton; update test cases