[PATCH v3 06/17] riscv: Fix extension subset checking