Assorted fixes about tasks and selecting in libstd

Each commit is pretty much what it says on the tin. r anybody.