[TASK] rpFlatSelect directive fix (RT-2899)

I've moved the directive, and I think this will help as on Local machine I cannot reproduce the issue. it worked fine.