Make the builder more efficient by caching the language service

* this is only possible on the develop branch because the bug which
resulted in incorrect diagnostic errors was fixed