Ensure handlers run when meta tasks are defined and add handler integration tests

Fixes #6678
Fixes #6670