Fix for infinite digest in case of custom directives usage.