Fix #10932. Treat "" and "::" as invalid on constantize