BUG: mantis #1365: switched to using wall reflection to calculate wall normals, and added caching of the wall values