  Over the past years, thousands of stellar flares have been detected by
harvesting data from large photometric surveys. These detections, however, do
not account for potential sources of contamination such as background stars
appearing in the same aperture as the primary target. We present a new method
for identifying the true flare sources in large photometric surveys using data
from the Kepler mission. Potential flares are identified in two steps: first,
we search the light curves for at least two subsequent data points exceeding a
5{\sigma} threshold above the running mean. For these two cadences, we subtract
the "quiet" stellar flux from the Kepler pixel data to obtain new images where
the potential flare is the main light source. In the second step, we use a
Bayesian approach to fit the point spread function of the instrument to
determine the most likely location of the flux excess on the detector. We
applied our method to 5862 main-sequence stars with near-solar effective
temperatures. We found 2274 events exceeding the 5-sigma in at least two
consecutive points in the light curves. Applying the second step reduced this
number to 342 superflares. Of these, 283 flares happened on 178 target stars,
47 events are associated with fainter background stars, and in 10 cases, the
flare location cannot be distinguished between the target and a background
star. We also present cases where flares have been reported previously but our
technique could not attribute them to the target star. We conclude that 1)
identifying outliers in the light curves alone is insufficient to attribute
them to stellar flares and 2) flares can only be uniquely attributed to a
certain star when the instrument pixel-level data together with the point
spread function are taken into account. As a consequence, previous flare
statistics are likely contaminated by instrumental effects and unresolved
astrophysical sources.
