Fixes #2539 by checking if extension was specifically supplied as an option

This will need to be applied to `2-1-stable`, too.

In my testing this fixes the issue that was reported by @duccioarmenise when I run the commit on top of `2-1-stable` and all tests pass locally.