I think that this is really related to a new feature of Powershell v3. It allows you to index into an object even if it does not have an index (see http://blogs.msdn.com/b/powershell/archive/2012/06/14/new-v3-language-features.aspx).
If the VM has only one hard disk then $disks is not returned as an array, but as a single hard disk object, and indexing into it will fail with Powershell v2, but not with Powershell v3.
- Andreas