diff --git a/src/frontend/A64/decoder/a64.h b/src/frontend/A64/decoder/a64.h
index 8aeb613e..73752659 100644
--- a/src/frontend/A64/decoder/a64.h
+++ b/src/frontend/A64/decoder/a64.h
@@ -8,6 +8,7 @@
 
 #include <algorithm>
 #include <functional>
+#include <set>
 #include <vector>
 
 #include <boost/optional.hpp>
@@ -31,13 +32,20 @@ std::vector<Matcher<Visitor>> GetDecodeTable() {
     };
 
     std::stable_sort(table.begin(), table.end(), [](const auto& matcher1, const auto& matcher2) {
-        // If the matchers aren't related, keep their relative positions the same.
-        if ((matcher1.GetMask() & ~matcher2.GetMask()) && (~matcher1.GetMask() & matcher2.GetMask()))
-            return false;
         // If a matcher has more bits in its mask it is more specific, so it should come first.
         return Common::BitCount(matcher1.GetMask()) > Common::BitCount(matcher2.GetMask());
     });
 
+    // Exceptions to the above rule of thumb.
+    const std::set<std::string> comes_first {
+        "MOVI, MVNI, ORR, BIC (vector, immediate)",
+        "FMOV (vector, immediate)",
+    };
+
+    std::stable_partition(table.begin(), table.end(), [&](const auto& matcher) {
+        return comes_first.count(matcher.GetName()) > 0;
+    });
+
     return table;
 }