Added application_id to reference check query (duh).
Partial fix for bug 3058355.
Authored by: jimwinston 2010-09-03
Parent: [r911]
Child: [r913]