Adding CONVERT on the end seems to fix things, although I don't think you were doing anything wrong based on what the manual says. We'll look at the code and correct the manual or the code, whichever turns out to be wrong, but here's a workaround for now:
Image WIDTH=400 PRESERVEASPECTRATIO REPLACE HERE CONVERT