My savegame was for the second case i told: the imp doesn't take the spell book. But i found why: it is because i have a closed door blocking the way to the library, that is one of the cases i just tell in my recently new post:
http://keeperklan.com/threads/4745-S...t-blocked-ways
If you add the warning messages i suggest, you can use this savegame to test if it appears.
So we need to investigate the other case: why imps prefer reinforcing walls before claiming enemy slabs.