Replace resizing of vectors in get_bem_values by a paranoid check

Should be the right size already since the same vector is reused each
time. So just check it's the right size instead of trying to resize it.

Fixes a strange memory error when running in parallel.