PERF-1259: Moved rspec collection map outside of if blocks.