Make do-notation a bit more flexible (Trac #1537)