Fix handling of trailing colon in key name. RT#92916

The actual fix is from Tux.