Fix for issue #47. Use 2nd level cache for nested queries.