The app_offline.htm is shut-down the application, but not fully stop the compiler.
So, on the first dll that you have upload, the compiler see the different and start the compilation again... so then when you try for the next dll probably is used by the compilation and can not be delete/replaced.
There is also the possibility that even if you ask for shut-down the application still make process and use this dll.
What I do, I upload all files on the server in one other directory, I open the app_offline.htm, then I wait for all my pool to close (I have place message on the application end) and then I copy from the server all the update files fast. The different is that with the ftp the time to upload is bigger than the time the compiler trigger for recompile the global functions from dll.
To see that even with the app_offline.htm , the system is still make compiles, just use Process Explorer and see the compilations.
What is compile ? I think that compile the dlls except the pages.
The message is from compiler that try to compile the program, from the first dll that you have upload the compiler is triggered and start the new compilation, now you uploading the next one, and while is trying to make the compile, the dll is locked by ftp.