The patch looks good. The top comment of RunIdentifySystem is incorrect though. It should mention that a database name is returned and not a plugin name.
I am not sure what happened here, gmail has suddendly removed the subject of the email... Sorry for the noise and breaking the thread.