In-house lawyers' errors played part in £7m loss