Fix registration of Opaque type alias in REPL

Closes PR 14487