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

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