Merge "Fix reflection handling and test flakiness"