Fix membership discounting to not do expensive unnecessary queries
Created by: eileenmcnaughton
This is reported in #124 (closed) and comes from a mixing of membership & membership_type as the entity, which was done as part of an emergency fix some time back