FIX: Don't uncloak elements unless they are `inDOM`. Also made the
`didInsertElement` and `willDestroyElement` hooks safer.