Bug 25875: Move check for module_bit and code to the JOIN