You could see if the same thing happens with the ASObjC equivalent:
use framework "Foundation"
use framework "AppKit"
set theList to (current application's NSFileManager's defaultManager()'s mountedVolumeURLsIncludingResourceValuesForKeys:({current application's NSURLVolumeNameKey}) options:0) as list
set theNSWorkspace to current application's NSWorkspace's sharedWorkspace()
repeat with i from 1 to count of theList
set thePath to (item i of theList)'s path()
set {theResult, isUnmountable} to (theNSWorkspace's getFileSystemInfoForPath:thePath isRemovable:(missing value) isWritable:(missing value) isUnmountable:(reference) |description|:(missing value) |type|:(missing value))
if theResult and isUnmountable as boolean = true then
(theNSWorkspace's unmountAndEjectDeviceAtURL:(item i of theList) |error|:(missing value))
end if
end repeat