identifyFileFormat: limit IDRule query to current command

Without this, multiple results could be returned if multiple commands
declare the same output. identifyFileFormat expects a single result.