Consider the wording of detect magic itself for a bit:
snip
Lingering Aura
A magical aura lingers after its original source dissipates (in the case of a spell) or is destroyed (in the case of a magic item). If detect magic is cast and directed at such a location, the spell indicates an aura strength of dim (even weaker than a faint aura).
Because an instantaneous spell/power is no longer functioning (the energy has come and gone), detect magic can only detect the dim lingering aura; for wall of stone, this would last for 1d6 minutes.