check task field more finely

fixes #5421 (partially)