Yep, 1 instead of 2. $dm-clear() doesn't have any effect on this. $versions is an array of 1 version, 'jcr:rootVersion'. 

Although it could be affected by this problem: https://groups.google.com/d/msg/symfony-cmf-devs/--3J2hbMsa8/bupTUgqeb-wJ - getAllLinearVersions() seemed to be 'stuck' on the first result it saw, even after $dm->clear()