Add boundary checks for derived tables in FROM clause

Proposal for sqlmapproject/sqlmap#698.