I tried to bypass the problem of this case by writing a script that creates markers for mines.
But then I ran into another problem. How to create markers only for mines that are revealed to the side of the player. player knowsAbout mymine always returns 0. I don't know if I missed any command that I could use to get this info.