fix handling of duplicates in angular directive

Change-Id: I15536a09503a14ca026819e2963ac25c4d538867
Reviewed-on: http://review.couchbase.org/33820
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>