Yea, the guy that goes into the source code of the optimizer to figure out the cause for a poorly optimized query plan is the amateur!
This was just one of many systems that thousands of facebook engineers build and they did not think of some edge cases. We do know how to write queries or to operate our databases, in general.