reverse inline arguments so they have left-to-right order (closes issue #2627)
add test for issue #2508