Rabat narrowly misses out on front row slot