Fix rt test crasher when decoding invalid URIs

Fixes a crasher on it:...Little_Broken_Hearts.

Change-Id: Ia5baa357c81abb5bdc0ede3b49151e65ed1624f3
Merge "Fix rt test crasher when decoding invalid URIs"