This Inside Macintosh explanation is not really correct. When you specify and creator and pass an index value of 0, PBDTGetAPPL() actually returns information about the LAST copy of the application the Desktop Manager used to update the Desktop database, NOT the copy with the most recent creation date. In other words, PBDTGetAPPL() returns Last-In-First-Out information from the Desktop database.
To avoid launching a copy of the application that is currently in the Trash folder add a check for the application's parent ID. If the "first choice" is in the Trash, then make indexed calls (beginning with an index of 1) to PBDTGetAPPL to get information about all copies of the application and compare the ioAPPLParID and ioTagInfo (creation date) fields to find the copy of the application with the latest creation date that is not currently in the Trash.