Backport PR #6706: Correctly display prompt numbers that are 'None'

Fixes #6702