I would just write 

```py
a1 = sqrtdenest(sqrt(a**2)) # The core will automatically denest the powers in a**2 where the bases are positive
```

The `_mexpand` is confusing, and should be unnecessary (that should happen in regular sqrtdenest automatically).