[Aggregator WA] Handle invalid Q2WIdx param.
[Aggregator WA] Moved template perversions to separate header.