Fixed directive update being called in the incorrect context