MDL-36941 core_message: dont query DB unnecessarily checking read status