This is another inconsistency with NES behavior (the more important one being the Statues' firing behavior, so read that first). And yes, this has been posted before but bears repeating.

Basically, on the NES, if a grave is pushable (i.e. the ones that open up a secret), it cannot spawn Ghinis until after it has been pushed. Kinda makes sense, because if you push it from any direction but above, you'd automatically take damage, and yet you can push it from below as well.

Fortunately, there is a workaround. A very simple solution is to create 2 combos: Both have the image of a grave, but one is just a solid block, and the second is an actual grave combo. Have these 2 combos in order in the combo page (fake one first, then regular ghini-spouting one).

Place flag 91 on the tiles immediately above and below the pushable one. This will cause the combo to change from the fake to the real grave once it is pushed.

So, rather than an edit to the game code itself, I'd suggest the workaround be implemented on the first and second quest files. Further note that in the 2nd quest, the location of the magical sword from the first quest has an unpushable, non-ghini-spouting grave, so just use the "fake" grave tile and don't put a push flag on it: voila! fixed.