First version of fix for LIMIT cost estimation.