[BUGFIX] Sortnumber gets the correct ID now and returns an array key

Change-Id: I901b1fc72edc36a47746893263884f542dc8f403
Resolves: #60674
Reviewed-on: http://review.typo3.org/31905
Reviewed-by: Jo Hasenau <info@cybercraft.de>
Tested-by: Jo Hasenau <info@cybercraft.de>