A small amount of fungi that produces magic mushrooms could be deemed illegal under a law which was heard by lawmakers on Thursday.