The rowLayout index is 0 which means the header was being inserted at
index -1. Qt interprets negative indexes as the end of the list, which
caused it to be inserted after the actual rows, rather than before.
This also makes the count of rows public.