We ran into issues on rebuild when using exported resources. It makes sense to deactivate hosts in PuppetDB when they are rebuilt.
Adding :deactivate_host on after_build hook as well.