Fixed bug that prevented users from saving media to categories when you ...

...have a complicated heirarchy.

This a fix for the following JIRA ticket http://jira.broadleafcommerce.org/browse/BLC-866