include filter height when calculating grid height

An addition to the pull request #2008 solution for issue #1873
This fix includes height of filters in the calculation of the initial grid height.