diff --git a/libcorpus2/tagset.cpp b/libcorpus2/tagset.cpp
index 00f31f4ed289bd5d9ee371563fc73c85cf7e3e15..b4069c02ddde25895d50be960a9982d16fe28cbb 100644
--- a/libcorpus2/tagset.cpp
+++ b/libcorpus2/tagset.cpp
@@ -141,6 +141,7 @@ namespace {
 			std::vector< mask_t > & current,
 			const std::vector<mask_t> & to_add, mask_t to_add_attr)
 	{
+		if (to_add.empty()) return;
 		size_t current_size = current.size();
 		for (size_t ai = 1; ai < to_add.size(); ++ai) {
 			for (size_t oi = 0; oi < current_size; ++oi) {