Fix running tasks after a gruntfile is reloaded. Fixes GH-184.