Can we safe-proof this against multibyte strings in $k ?