The reason for prayer at the grave here is that burial occurred without the funeral prayer having been offered at all. This differs from an already completed funeral prayer.
A practical case therefore requires checking whether a prayer took place and, if not, how recently the burial occurred.