Thanks for the report markbou!
This is however not a bug. Note that you spent your 1 "free" buy of the turn on the Villa. Normally this isn't a problem, as playing Villa gives you +1 Buy, so you can buy some more cards (after probably having used the +2 Actions from Villa to play some more cards).
But with Way of the Mole (or any other Way), you are not following the Villa's normal instructions, so you don't get +1 Buy from playing Villa. If you have no other cards that give you +Buy, you have 0 Buys.
That's why the turn ends automatically in your described scenario: Once you've played all your Treasures, you just have nothing more to do, so the program ends your turn.
Also note that returning to your Action phase did not automatically give you +1 Action and +1 Buy. That happens when your turn starts and is not repeated when Villa retutns you to the Action phase.
You get +1 Action explicitely per the Villa's triggered effect (so you can play the Villa even if you entered your buy phase with no Actions left). But the +1 Buy is not automatic, you need to play and follow Villa's instruction for that to happen, which isn't happening when using a Way.