Allow colons and dashes in categories

Setting categories like `%x:foo` get parsed as XHP, so we need to
account for their translated values when checking their presence.