It is already fixed on 6 and only affects 5.4.
Will see if I need to backport it to 5.3 once I have a test case for it.