Looks like there are two pattern caches that need to be cleared for this to work- added the second one. Added integration tests for add_host to prevent future regressions.