Fix a NPE when filtering commands after a reload