implement closed-overs collecting as a separate pass, fix constant collectiong. keeps the same interface