Gets rid of unnecessary try/catches in compileItem().