The command g/^/m0 works in ed because the move commands are done in sequence. In sam and (supposedly) acme, they're done atomically, and result in a big no-op. They have a completely different model of execution.
The acme problem is just a bug that should be fixed. -rob
