Corrected length calculations in AHCIDevice (fixes #37).