Fixes compile error (scala vs java set). Why can't this be inlined?