MUC MAM Query Fails with "bad-request – IQ request cannot be processed by the MUC room itself" in Clustered Setup (Openfire 5.0.1)

We are using Openfire version 5.0.1 in both DEV and QA with a 2-node clustered setup and shared database, where our application connects a user to a MUC room and queries message history using MAM; this works consistently in DEV but in QA the same operation fails with XMPPError: bad-request - modify (IQ request cannot be processed by the MUC room itself), even though the application code, server version, and cluster configuration are the same in both environments