In a previous post I gave a solution for this error (an example error message can also be found in the post).
Recently I came across the error again and this time the fix in my previous post did not solve the problem. In fact, the dll's in the temporary folders that the error message said was locked, did not even exist. It turned out that the server administrator had been playing around with the access rights on the website and that the ASPNET account no longer had any permissions on the bin folder of the website. Giving access to this account solved the problem without having to change anything on the indexing service on the machine.