Change code to fix flaky test.

functional needs_controller_test line 32 was failing due to the return
order of the needs.

Was getting 3 different return orders: 1,2,3,4,5; 2,1,3,4,5; 3,4,1,2,5.