Mappings: Fix Get field mapping api with pretty flag

Change an assertion using re-parse pretty printing

Closes #6552