Fix handling of LIMIT and OFFSET in virtual tables that are part of