Fixed: sometimes the returned set was not unmodifiable

Change-Id: Ifb40f5389766576cf0cae272e5237bd0501592d8
Merge "Fixed: sometimes the returned set was not unmodifiable"